package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.model.request.mall.AdminMallLogisticsRequest;
import com.starlink.model.request.mall.AdminRefundRequest;
import com.starlink.model.request.mall.WechatRefund;
import com.starlink.model.vo.mall.AdminRefundsVO;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.MallRefundsDO;
import com.starlink.model.request.MallRefundsRequest;
import com.starlink.model.vo.MallRefundsVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface MallRefundsService extends IService<MallRefundsDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    MallRefundsVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<MallRefundsVO> pageQuery(Pageable pageable,MallRefundsRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<MallRefundsVO> listQuery(MallRefundsRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(MallRefundsRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(MallRefundsRequest request);
    /**
     * 根据主键删除
     * @param ids
     * @return
     */
    Boolean deleteDOByIds(String ids);

    /**
     * 寄回商品
     * @param request
     * @return
     */
    Boolean free(MallRefundsRequest request);

    PageInfo<List<AdminRefundsVO>> pageList(AdminRefundRequest request, Pageable pageable);

    /**
     * 审批
     * @param request
     * @return
     */
    Boolean approval(AdminRefundRequest request);

    /**
     * 售后退款或换货
     * @param request
     * @param wechatRefund
     * @return
     */
    Boolean pass(AdminRefundRequest request, WechatRefund wechatRefund);

    /**
     * 售后换货发货
     * @param request
     * @return
     */
    Boolean deliverChangeGoods(AdminMallLogisticsRequest request);
}
